package com.L1ngg;

import java.util.Scanner;
public class text04 {
	public static void main(String[] args) {
		
		int i;
		int score;
		float gradeSum = 0;
		float arr[];
		arr = new float[5];
		
		Scanner reader = new Scanner(System.in);
		
		System.out.println("请依次输入<JAVA语言编程>,<高等数学>,<大学英语>,<大学物理>"
				+ ",<体育>这五门课程的成绩");
		
		for(i = 0; i < 5; i++) {
			score = reader.nextInt();
			arr[i] = GetGrade(score);
		}
		for(i = 0; i < 5; i++)
			gradeSum += arr[i];
		
		System.out.println("所获得的绩点之和是: " + gradeSum );
	}
	public static float GetGrade(int score) {
		float grade = 0;
		if(score<=60) 
			grade = 0;
		if(score>=60&&score<=63) 
			grade = 1.0f;
		if(score>=64&&score<=65) 
			grade = 1.5f;
		if(score>=66&&score<=67) 
			grade = 1.7f;
		if(score>=68&&score<=71) 
			grade = 2.0f;
		if(score>=72&&score<=74) 
			grade = 2.3f;
		if(score>=75&&score<=77) 
			grade = 2.7f;
		if(score>=78&&score<=81) 
			grade = 3.0f;
		if(score>=82&&score<=84) 
			grade = 3.3f;
		if(score>=85&&score<=89) 
			grade = 3.7f;
		if(score>=90&&score<=100) 
			grade = 4.0f;
		return grade;
	}
}